import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './components/App';
import Secondary from './components/Secondary';
import Secondary1 from './components/Secondary1';
import registerServiceWorker from './registerServiceWorker';
import { Router, Route, BrowserRouter, Link } from 'react-router-dom';
import { Layout, Menu } from 'antd';
// insert into index.js




ReactDOM.render(
    <BrowserRouter>
        <div id="wrapper">

            <Layout class="App-header">
                <Menu
                    theme="dark"
                    mode="horizontal"
                    defaultSelectedKeys={['1']}
                    style={{ lineHeight: '64px' }}
                >
                    <Menu.Item key="1"><Link to="/">首页</Link></Menu.Item>
                    <Menu.Item key="2"><Link to="/Secondary">分类展示</Link></Menu.Item>
                    <Menu.Item key="3">nav 3</Menu.Item>
                </Menu>

            </Layout>
            <Route exact path="/" component={App} />
            <Route exact path="/Secondary/" component={Secondary1} />


        </div>
    </BrowserRouter>
    , document.getElementById('root'));
registerServiceWorker();
